//字符串的截取
var str = 'hello javascript';
console.log(str.slice(0,5));
console.log(str.slice(6));
console.log(str.slice(-6,-3));
console.log(str.substring(6,10));
var email = 'tom@163.com';
//查找@所在的位置
var index = email.indexOf('@');
//console.log(index);
console.log(email.slice(0,index));
console.log(email.slice(index+1));
//通过身份证号，来获取年月日 - '1995年10月10日'
var str2 = '110123197809103726';
var year = str2.slice(6,10);
var month = str2.slice(10,12);
var date = str2.slice(12,14);
console.log(year+'年'+month+'月'+date+'日');














